import request from './request'

// 获取商家列表
export function getBusinessList() {
  return request({
    url: '/api/v1/business/shop?page=1&lng=113.123762&lat=39.836312',
    method: 'get'
  })
}

// 获取商家详情
export function getBusinessInfo(branch_shop_id) {
  return request({
    url: `/api/v1/business/info?branch_shop_id=${branch_shop_id}`,
    method: 'get'
  })
}

// 获取商家公告
export function getBusinessNotice(branch_shop_id) {
  return request({
    url: `/api/v1/business/notice?branch_shop_id=${branch_shop_id}`,
    method: 'get'
  })
}

// 获取热门搜索列表
export function getHotList() {
  return request({
    url: '/api/v1/search/hotkeywords',
    method: 'get'
  })
}

// 获取搜索出的商品列表
export function getGoodsList(data) {
  return request({
    url: `api/v1/search/goods?kwords=${data.kwords}&lng=${data.lng}&lat=${data.lat}&page=${data.page}`,
    method: 'get'
  })
}
